/*
 * GeoManager.h
 *
 *  Created on: 14 Oct 2011
 *      Author: allan
 */

#ifndef GEOMANAGER_H_
#define GEOMANAGER_H_

// C++ includes
#include <map>
#include <string>
#include <vector>
using namespace std;

// GeoReact includes
#include <Core/Activity.h>
#include <Geochemistry/Kinetics/MineralKinetics/MineralKinetics.h>

// GeoReact forward declarations
class Multiphase;
class ReactionSystem;
class GeoSystem;

class GeoManager
{
public:
	GeoManager();
	
	void AddAqueousSpecies(const string& species);
	
	void AddGaseousSpecies(const string& species);
	
	void AddMineralSpecies(const string& species);
	
	void SetAqueousSpecies(const vector<string>& aqueousSpecies);
	
	void SetGaseousSpecies(const vector<string>& gaseousSpecies);
	
	void SetMineralSpecies(const vector<string>& mineralSpecies);
	
	void SpeciateAqueousSpecies(const vector<string>& components);
	
	void SpeciateGaseousSpecies(const vector<string>& components);
	
	void SpeciateMineralSpecies(const vector<string>& components);
	
	void SetActivityCoefficient(const string& species, const ActivityCoefficient& activityCoefficient);
	
	void SetMineralKinetics(const string& mineral, const MineralKineticsInfo& mineralKineticsInfo);
	
	const vector<string> GetAqueousSpecies() const;
	
	const vector<string> GetGaseousSpecies() const;
	
	const vector<string> GetMineralSpecies() const;
	
	const Phase AssembleAqueousPhase(const vector<string>& species) const;
	
	const Phase AssembleGaseousPhase(const vector<string>& species) const;
	
	const Phase AssembleMineralPhase(const vector<string>& species) const;
	
	const Multiphase AssembleMultiphase() const;
	
	const ReactionSystem AssembleEquilibriumReactions(const Multiphase& multiphase) const;
	
	const ReactionSystem AssembleKineticReactions(const Multiphase& multiphase) const;
	
	const GeoSystem AssembleGeoSystem() const;
	
private:
	vector<string> aqueousSpecies;
	
	vector<string> gaseousSpecies;
	
	vector<string> mineralSpecies;
	
	map<string, ActivityCoefficient> activityCoefficients;
	
	map<string, MineralKineticsInfo> mineralKineticsInfos;
	
	vector<string> kSpecies;
};

#endif /* GEOMANAGER_H_ */
